home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / FRITZ1.DXR / 00295.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  3.0 KB  |  88 lines

  1. on exitFrame
  2.   global mnv, ppl, foes, advance, pwr, fxpath, shandlir
  3.   if getAt(mnv, 1) > 1 then
  4.     if (the keyCode > 124) and (the memberNum of sprite getAt(ppl, 1) < 46) then
  5.       set the memberNum of sprite getAt(ppl, 1) to member(the memberNum of sprite getAt(ppl, 1) + 1, 2)
  6.       if the keyCode = 126 then
  7.         set the locV of sprite getAt(ppl, 1) to the locV of sprite getAt(ppl, 1) - 17
  8.       else
  9.         set the locV of sprite getAt(ppl, 1) to the locV of sprite getAt(ppl, 1) + 17
  10.       end if
  11.       setAt(mnv, 1, getAt(mnv, 1) - 1)
  12.     else
  13.       if (the keyCode > 122) and (the memberNum of sprite getAt(ppl, 1) < 46) then
  14.         set the memberNum of sprite getAt(ppl, 1) to member(the memberNum of sprite getAt(ppl, 1) + 1, 2)
  15.         if sprite(getAt(ppl, 1)).flipH = 1 then
  16.           set the locH of sprite getAt(ppl, 1) to the locH of sprite getAt(ppl, 1) - 17
  17.         else
  18.           set the locH of sprite getAt(ppl, 1) to the locH of sprite getAt(ppl, 1) + 17
  19.         end if
  20.         setAt(mnv, 1, getAt(mnv, 1) - 1)
  21.       else
  22.         if getAt(mnv, 1) < 20 then
  23.           set the memberNum of sprite getAt(ppl, 1) to member(the memberNum of sprite getAt(ppl, 1) + 1, 2)
  24.           setAt(mnv, 1, getAt(mnv, 1) - 1)
  25.         else
  26.           set the member of sprite getAt(ppl, 1) to member(1, 2)
  27.           setAt(mnv, 1, 1)
  28.         end if
  29.       end if
  30.     end if
  31.   else
  32.     if the memberNum of sprite getAt(ppl, 1) < 82 then
  33.       set the member of sprite getAt(ppl, 1) to member(1, 2)
  34.     end if
  35.   end if
  36.   if sprite 5 within getAt(ppl, 1) and (sprite(5).visible = 1) then
  37.     sprite(5).visible = 0
  38.     setAt(pwr, 1, getAt(pwr, 1) + 10)
  39.     sound playFile 1, fxpath & "heart.aif"
  40.   end if
  41.   if shandlir > 0 then
  42.     shandlir = shandlir - 1
  43.     set the locV of sprite 4 to the locV of sprite 4 + 40
  44.     set the locH of sprite 4 to the locH of sprite 4 - 20
  45.     if shandlir = 4 then
  46.       repeat with i = 2 to 4
  47.         if sprite 4 intersects getAt(ppl, i) then
  48.           setAt(pwr, i, getAt(pwr, i) - 20)
  49.           if i = 2 then
  50.             setAt(foes, 1, 94)
  51.             chkhit(getAt(ppl, 2), 87, 94, 2, 1, 137)
  52.             next repeat
  53.           end if
  54.           if i = 3 then
  55.             setAt(foes, 2, 122)
  56.             chkhit(getAt(ppl, 3), 116, 122, 3, 2, 138)
  57.             next repeat
  58.           end if
  59.           if i = 4 then
  60.             setAt(foes, 3, 285)
  61.             chkhit(getAt(ppl, 4), 271, 280, 4, 3, 294)
  62.           end if
  63.         end if
  64.       end repeat
  65.       shandlir = 0
  66.       set the memberNum of sprite 4 to 303
  67.     end if
  68.   end if
  69.   if (advance = 13) or (advance = 14) then
  70.     foemov(76, 77, 87, 94, 95, 8, 5, 2, 2, 1, 10, 3)
  71.     foemov(103, 104, 116, 122, 123, 13, 7, 3, 3, 2, 9, 5)
  72.     strata2(3)
  73.   else
  74.     if advance = 15 then
  75.       foemov(261, 262, 271, 280, 287, 16, 5, 4, 4, 3, 10, 6)
  76.       strata2(3)
  77.     else
  78.       if (advance = 16) or (advance = 17) then
  79.         foemov(103, 104, 116, 122, 123, 13, 7, 3, 3, 2, 9, 5)
  80.         foemov(261, 262, 271, 280, 287, 16, 5, 4, 4, 3, 10, 6)
  81.         strata2(3)
  82.       else
  83.         strata2(3)
  84.       end if
  85.     end if
  86.   end if
  87. end
  88.